import { axios } from '@/utils/request'

/**
 * 查询随笔
 *
 * @author Johnnie Wind
 * @date 2021-10-06 21:02:04
 */
export function essayPage (parameter) {
  return axios({
    url: '/essay/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 随笔列表
 *
 * @author Johnnie Wind
 * @date 2021-10-06 21:02:04
 */
export function essayList (parameter) {
  return axios({
    url: '/essay/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 添加随笔
 *
 * @author Johnnie Wind
 * @date 2021-10-06 21:02:04
 */
export function essayAdd (parameter) {
  return axios({
    url: '/essay/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑随笔
 *
 * @author Johnnie Wind
 * @date 2021-10-06 21:02:04
 */
export function essayEdit (parameter) {
  return axios({
    url: '/essay/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除随笔
 *
 * @author Johnnie Wind
 * @date 2021-10-06 21:02:04
 */
export function essayDelete (parameter) {
  return axios({
    url: '/essay/delete',
    method: 'post',
    data: parameter
  })
}

/**
 * 导出随笔
 *
 * @author Johnnie Wind
 * @date 2021-10-06 21:02:04
 */
export function essayExport (parameter) {
  return axios({
    url: '/essay/export',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}
